package com.ctshk.rpc.order.hotel.req.h5;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;

@Data
@ApiModel(description="提交订单req")
public class HotelOrderSubmitReq implements Serializable {

    private static final long serialVersionUID = 494906043905341033L;

    @NotNull(message = "酒店产品id必传")
    @ApiModelProperty(value = "酒店产品id", required = true)
    private Long productId;

    @NotNull(message = "请填写入住日期")
    @ApiModelProperty(value = "入住日期", example = "2021-05-01", required = true)
    private LocalDate checkInDate;

    @NotNull(message = "请填写离店日期")
    @ApiModelProperty(value = "离店日期", example = "2021-05-03", required = true)
    private LocalDate checkOutDate;

    @NotNull(message = "晚数不能为空")
    @ApiModelProperty(value = "晚数", example = "3", required = true)
    private Integer nights;

    @NotNull(message = "房间数量不能为空")
    @ApiModelProperty(value = "间房（房间数量）", example = "3", required = true)
    private Integer roomNum;

    @NotNull(message = "成人数不能为空")
    @ApiModelProperty(value = "成人数", example = "2", required = true)
    private Integer adultNum;

    @NotNull(message = "儿童数不能为空")
    @ApiModelProperty(value = "儿童数-没有传0", example = "4", required = true)
    private Integer childrenNum;

    @Valid
    @ApiModelProperty(value = "房间入住人信息", required = true)
    private List<HotelOrderRoomCustomerInfoReq> hotelOrderRoomCustomerInfos;

    @Valid
    @ApiModelProperty(value = "联系人信息", required = true)
    private HotelOrderContactPersonInfoReq hotelOrderContactPersonInfo;

    @ApiModelProperty(value = "是否使用积分", example = "true")
    private boolean isUsePoints;

    @ApiModelProperty(value = "会员ID")
    private String memberId;

    @ApiModelProperty(value = "使用积分", example = "300")
    private Integer usingPoints;

    @ApiModelProperty(value = "发票抬头")
    private String invoice;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "推广码", example = "ZH423D")
    private String couponCode;

    @ApiModelProperty(value = "推广码减免金额", example = "200")
    private BigDecimal couponDeduction;

    @ApiModelProperty(value = "C端下单用户id",hidden = true)
    private Long userId;

}
